package cn.weekimwee.firstlineofcodeforkotlin.unit4

import android.os.Bundle
import android.support.v4.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import cn.weekimwee.firstlineofcodeforkotlin.R
import kotlinx.android.synthetic.main.fragment_news_content.*

/**
 * Created by Wee Kim Wee on 2018/2/9.
 */
class NewsContentFragment :Fragment(){

    override fun onCreateView(inflater: LayoutInflater?, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        return inflater?.inflate(R.layout.fragment_news_content,container,false)
    }

    fun refresh(newsTitle:String,newsContent:String){
        visibility_layout.visibility =View.VISIBLE
        news_title.text = newsTitle
        news_content.text = newsContent
    }
}